The present invention relates to a method and apparatus for providing responses to requests of a client, and particularly to a method and apparatus for providing responses to requests of a client that is in an off-line state.
The nineties of the 20th century featured a tremendous social technology revolution which by the collaboration of the data processing industry with the consumer electronics industry. Like all other revolutions, it has had a prominent effect on the technology development trend, especially accelerating the development of those technologies which have been in a fledgling state. One main field among these technologies is the transmission of Internet relevant documents, media and applications. The combination of the consumer electronics industry with the data processing industry has greatly prompted demands on versatile communication transmission methods. From being a loose-coupled computer network used for transmitting science and government data, the Internet has entered a strikingly developing era after over ten years of silent existence. With such development, business and consumers can access all the documents, media and programs directly.
The Internet is an open and worldwide computer network which includes lots of connected subnets. It has been developed from the previous American ARPAnet. Now, it mainly uses TCP/IP as the communication protocol. TCP/IP is an acronym for xe2x80x9cTransfer Control Protocol/Internet Protocolxe2x80x9d, which is a software protocol developed by the U.S. Department of Defense for computer communication. The Internet can be described as a geographically distributed remote computer network system which executes such networking protocols to allow users to share information and interact. Because of this-kind of widely used information sharing, remote networks such as the Internet have been fully developing into the xe2x80x9copenxe2x80x9d systems. Therefore, users can design their software applications without constraints to perform specific operations or services. The detailed information about the Internet nodes, objects and links can be referred to in the textbook xe2x80x9cMastering the Internetxe2x80x9d, authored by G. H. Cady etc., and published by Sybex Corporation in Alameda, Calif. in 1996.
The World Wide Web (WWW) is the Internet multimedia information indexing and retrieving system. WWW clients use Hypertext transfer protocolxe2x80x94HTTP to achieve transaction processing with the Web Server. HTTP is a well known communication protocol. It allows users to use Hypertext Markup Languagexe2x80x94HTML, which is a standard web page description language, to access all kinds of files, such as text, graphics, image, audio and video, etc. HTML provides a basic file format, and allows developers to specify links with other servers and files.
The client/server structure is very popular in WWW. In most cases, the Web client uses a browser to send requests to the web server, and to explain and display (or play) the hypertext information and all kinds of multimedia data formats returned from the Web server.
In real client/server network applications, it is not possible for the client-end software to keep online all the time, especially for those executed on mobile devices. Currently, the widely used mobile devices include the notebook PC such as IBM ThinkPad, handheld PC such as 3COM PalmPilot and IBM WorkPad, or many other handheld devices embedded with network connection. Because of the mobility of such devices, it is inconvenient for them to connect to the net in most situations.
When network connection is impossible, it is absolutely necessary for the client side software to keep working off-line, thus not only the handy features of mobile devices but the huge advantages of the Internet could be fully utilized as well.
Currently, the client side software is unable to work normally when off-line unless it has been specifically so designed. Actually, there have been many specific methods to address this problem. But these methods are either for a specific application or for specific hardware. A common and simple method is greatly needed to keep client side software working normally even when it is off-line.
The important difference between on-line and off-line states is that during the on-line state the client can get the response from the server if necessary. But in the latter case, the client is unable to communicate with the server. So, in client/server architecture, client side software is usually unable to keep on working normally during off-line state.
The first objective of this invention is to provide an apparatus for providing responses to requests of an off-line client.
The second objective is to provide a method for providing responses to requests of an off-line client.
The third objective is to provide a computer-readable media for recording programs which respond to the requests of an off-line client.
To achieve the objectives mentioned above, this invention provides an apparatus for providing responses for requests of an off-line client, characterized by comprising:
a request-response storage (703), provided in a client machine, which stores a plurality of requests and a plurality of responses;
a network flow redirector (701), for redirecting requests of the client from a network connection to the client machine itself by modifying system configuration of the client machine when said client is in an off-line state, and for redirecting requests of the client from the client machine itself to the network connection by resuming the system configuration of the client machine when said client leaves the off-line state and enters an on-line state; and
an off-line server (702), provided in the client machine, for receiving the requests of the client redirected by said network flow redirector (701) to the client machine itself, generating responses based on requests received, said plurality of requests and said plurality of responses stored in said request-response storage (703), and returning generated responses to said client as responses of a server.
To achieve the second objective mentioned above, this invention provides a method for providing responses for requests of an off-line client, characterized by comprising steps of:
(a) providing a request-response storage in a client machine, which stores a plurality of requests and a plurality of responses;
(b) redirecting requests of the client from a network connection to the client machine itself by modifying system configuration of the client machine when said client enters an off-line state; and
(c) while said client is in the off-line state, repeatedly performing in the client machine steps of:
(c1) receiving a request redirected to the client machine itself,
(c2) generating a response based on said request, said plurality of requests and said plurality of responses stored in said request-response storage, and
(c3) returning said response to said client as a response of a server.
To achieve the third objective mentioned above, this invention provides a computer-readable media for recording programs, on which a program is recorded for performing steps of:
when it is determined that a client enters an off-line state, modifying system configuration of the client machine, such that requests of the client are redirected from a network connection to the client machine itself; and
while said client is in the off-line state, repeatedly performing following steps in the client machine:
(c1) receiving a request redirected to the client machine itself,
(c2) generating a response based on said request, said plurality of requests and said plurality of responses stored in a request-response storage provided in the client machine, and
(c3) returning said response to said client as a response of a server.
According to the method and device provided in this invention, to allow the client to keep working normally while off-line, there is no need to modify the client software itself, just make some modification in the client machine""s system configuration. Thus, the mobility of the client machine is enhanced greatly. The off-line state is no longer an obstacle to the server and the client. Especially for the client-end software of Personal Digital Assistant (PDA) which is very complex, the mobility of the PDA device could be enhanced greatly because of the removal of the need to modify the client software. Furthermore, the user interface remains unchanged when both on-line and off-line, so there is no need to give additional training to the users.